package cate.common.table.item.rune.sheet;

import cate.common.table.ESheet;
import cate.common.table.item.rune.row.RuneSkillScoreRow;
import easy.java.dev.note.NoteClass;

@NoteClass(value = "符文技能评分")
public class RuneSkillScoreSheet extends ESheet<RuneSkillScoreRow> {

    @Override
    public String getSheetName() {
        return "徽章技能评分";
    }

    @Override
    protected RuneSkillScoreRow buildRow() {
        return new RuneSkillScoreRow();
    }

    public RuneSkillScoreRow getNextLevelRow(int skill) {
        RuneSkillScoreRow currentRow = this.get(skill);
        if (currentRow == null) {
            return null;
        }
        for (RuneSkillScoreRow row : this.getList()) {
            if (row.protoId == currentRow.protoId && row.level == currentRow.level + 1) {
                return row;
            }
        }
        return null;
    }
}
